Optimal. Leaf size=66 \[ -\frac {4 \sqrt [4]{-1} a^2 \text {ArcTan}\left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{\sqrt {d} f}-\frac {2 a^2 \sqrt {d \tan (e+f x)}}{d f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.107, Rules used = {3624, 3614,
211} \begin {gather*} -\frac {4 \sqrt [4]{-1} a^2 \text {ArcTan}\left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{\sqrt {d} f}-\frac {2 a^2 \sqrt {d \tan (e+f x)}}{d f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 3614
Rule 3624
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (e+f x))^2}{\sqrt {d \tan (e+f x)}} \, dx &=-\frac {2 a^2 \sqrt {d \tan (e+f x)}}{d f}+\int \frac {2 a^2+2 i a^2 \tan (e+f x)}{\sqrt {d \tan (e+f x)}} \, dx\\ &=-\frac {2 a^2 \sqrt {d \tan (e+f x)}}{d f}+\frac {\left (8 a^4\right ) \text {Subst}\left (\int \frac {1}{2 a^2 d-2 i a^2 x^2} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{f}\\ &=-\frac {4 \sqrt [4]{-1} a^2 \tan ^{-1}\left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{\sqrt {d} f}-\frac {2 a^2 \sqrt {d \tan (e+f x)}}{d f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 1.51, size = 157, normalized size = 2.38 \begin {gather*} -\frac {2 a^2 e^{-2 i (e+f x)} (\cos (2 (e+f x))+i \sin (2 (e+f x))) \sqrt {\tan (e+f x)} \left (2 i \tanh ^{-1}\left (\sqrt {\frac {-1+e^{2 i (e+f x)}}{1+e^{2 i (e+f x)}}}\right ) \sqrt {i \tan (e+f x)}+\tan (e+f x)\right )}{\sqrt {-\frac {i \left (-1+e^{2 i (e+f x)}\right )}{1+e^{2 i (e+f x)}}} f \sqrt {d \tan (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains complex when optimal does not.
time = 0.13, size = 295, normalized size = 4.47
method | result | size |
derivativedivides | \(\frac {2 a^{2} \left (-\sqrt {d \tan \left (f x +e \right )}+2 d \left (\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}+\frac {i \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}\right )\right )}{f d}\) | \(295\) |
default | \(\frac {2 a^{2} \left (-\sqrt {d \tan \left (f x +e \right )}+2 d \left (\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}+\frac {i \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}\right )\right )}{f d}\) | \(295\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] Result contains complex when optimal does not.
time = 0.52, size = 184, normalized size = 2.79 \begin {gather*} -\frac {a^{2} d {\left (-\frac {\left (2 i + 2\right ) \, \sqrt {2} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}} - \frac {\left (2 i + 2\right ) \, \sqrt {2} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}} + \frac {\left (i - 1\right ) \, \sqrt {2} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{\sqrt {d}} - \frac {\left (i - 1\right ) \, \sqrt {2} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{\sqrt {d}}\right )} + 4 \, \sqrt {d \tan \left (f x + e\right )} a^{2}}{2 \, d f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains complex when optimal does not.
time = 0.38, size = 278, normalized size = 4.21 \begin {gather*} \frac {d \sqrt {-\frac {16 i \, a^{4}}{d f^{2}}} f \log \left (\frac {{\left (-4 i \, a^{2} d e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (d f e^{\left (2 i \, f x + 2 i \, e\right )} + d f\right )} \sqrt {-\frac {16 i \, a^{4}}{d f^{2}}} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{2 \, a^{2}}\right ) - d \sqrt {-\frac {16 i \, a^{4}}{d f^{2}}} f \log \left (\frac {{\left (-4 i \, a^{2} d e^{\left (2 i \, f x + 2 i \, e\right )} - {\left (d f e^{\left (2 i \, f x + 2 i \, e\right )} + d f\right )} \sqrt {-\frac {16 i \, a^{4}}{d f^{2}}} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{2 \, a^{2}}\right ) - 8 \, a^{2} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}}{4 \, d f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - a^{2} \left (\int \left (- \frac {1}{\sqrt {d \tan {\left (e + f x \right )}}}\right )\, dx + \int \frac {\tan ^{2}{\left (e + f x \right )}}{\sqrt {d \tan {\left (e + f x \right )}}}\, dx + \int \left (- \frac {2 i \tan {\left (e + f x \right )}}{\sqrt {d \tan {\left (e + f x \right )}}}\right )\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] Result contains complex when optimal does not.
time = 0.60, size = 92, normalized size = 1.39 \begin {gather*} \frac {4 i \, \sqrt {2} a^{2} \arctan \left (\frac {8 \, \sqrt {d^{2}} \sqrt {d \tan \left (f x + e\right )}}{4 i \, \sqrt {2} d^{\frac {3}{2}} + 4 \, \sqrt {2} \sqrt {d^{2}} \sqrt {d}}\right )}{\sqrt {d} f {\left (\frac {i \, d}{\sqrt {d^{2}}} + 1\right )}} - \frac {2 \, \sqrt {d \tan \left (f x + e\right )} a^{2}}{d f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.15, size = 59, normalized size = 0.89 \begin {gather*} -\frac {2\,a^2\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{d\,f}+\frac {\sqrt {4{}\mathrm {i}}\,a^2\,\mathrm {atan}\left (\frac {\sqrt {4{}\mathrm {i}}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{2\,\sqrt {-d}}\right )\,2{}\mathrm {i}}{\sqrt {-d}\,f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________